/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

账户
httpdns OpenAPI账户接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKHttpdns/HttpdnsApiModel.h>


@implementation HttpdnsGetDomainsRequest
-(id) initWithRegion:(NSString *)regionId
pageIndex:(NSNumber*)pageIndex
pageSize:(NSNumber*)pageSize
domainName:(NSString*)domainName { 
    self.regionId = regionId;
    self.pageIndex = pageIndex;
    self.pageSize = pageSize;
    self.domainName = domainName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageIndex:(NSNumber*)pageIndex
pageSize:(NSNumber*)pageSize
domainName:(NSString*)domainName { 
    self.regionId = regionId;
    self.version = version;
    self.pageIndex = pageIndex;
    self.pageSize = pageSize;
    self.domainName = domainName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageIndex])
    {
        [result setValue:[self pageIndex] forKey:@"pageIndex"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageIndex = [dictionary objectForKey:@"pageIndex"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.domainName = [dictionary objectForKey:@"domainName"];
    return self;
} 

@end
@implementation HttpdnsDelDomainsRequest
-(id) initWithRegion:(NSString *)regionId
domainNames:(NSArray<NSString*>*)domainNames { 
    self.regionId = regionId;
    self.domainNames = domainNames;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
domainNames:(NSArray<NSString*>*)domainNames { 
    self.regionId = regionId;
    self.version = version;
    self.domainNames = domainNames;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self domainNames])
    {
        [result setValue:[self domainNames] forKey:@"domainNames"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainNames = [dictionary objectForKey:@"domainNames"];
    return self;
} 

@end
@implementation HttpdnsAddDomainsRequest
-(id) initWithRegion:(NSString *)regionId
domainNames:(NSArray<NSString*>*)domainNames { 
    self.regionId = regionId;
    self.domainNames = domainNames;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
domainNames:(NSArray<NSString*>*)domainNames { 
    self.regionId = regionId;
    self.version = version;
    self.domainNames = domainNames;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self domainNames])
    {
        [result setValue:[self domainNames] forKey:@"domainNames"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainNames = [dictionary objectForKey:@"domainNames"];
    return self;
} 

@end
@implementation HttpdnsOperateKeyRequest
-(id) initWithRegion:(NSString *)regionId
action:(NSString*)action
key:(NSString*)key { 
    self.regionId = regionId;
    self.action = action;
    self.key = key;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
action:(NSString*)action
key:(NSString*)key { 
    self.regionId = regionId;
    self.version = version;
    self.action = action;
    self.key = key;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.action = [dictionary objectForKey:@"action"];
    self.key = [dictionary objectForKey:@"key"];
    return self;
} 

@end
@implementation HttpdnsGetDomainsResult
-(id) initWithData:(DomainData*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[DomainData alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation HttpdnsGetDomainsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsGetDomainsResult* result = [[HttpdnsGetDomainsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsGetDomainsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation HttpdnsAddDomainsResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation HttpdnsDelDomainsResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation HttpdnsDelDomainsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsDelDomainsResult* result = [[HttpdnsDelDomainsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsDelDomainsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation HttpdnsAddDomainsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsAddDomainsResult* result = [[HttpdnsAddDomainsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsAddDomainsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation HttpdnsOperateKeyResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation HttpdnsCreateAccountResult
-(id) initWithData:(Account*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[Account alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation HttpdnsCreateAccountResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsCreateAccountResult* result = [[HttpdnsCreateAccountResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsCreateAccountResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation HttpdnsGetAccountInfoResult
-(id) initWithData:(Account*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[Account alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
@implementation HttpdnsCreateAccountRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation HttpdnsGetAccountInfoRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation HttpdnsGetAccountIdResult
-(id) initWithData:(AccountId*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[AccountId alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation HttpdnsGetAccountIdResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsGetAccountIdResult* result = [[HttpdnsGetAccountIdResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsGetAccountIdResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation HttpdnsGetAccountIdRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation HttpdnsGetAccountInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsGetAccountInfoResult* result = [[HttpdnsGetAccountInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsGetAccountInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation HttpdnsOperateKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
HttpdnsOperateKeyResult* result = [[HttpdnsOperateKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(HttpdnsOperateKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
